// dlg.txt

//mark_quest_dest(zone,x,y,layer,quest);
//void cancel_out_fight(0,short kill_enc)
//void make_outdoor_enc(short x,short y,short which_enc)
//void set_out_fight_field(short which_field)

begintalkscript;

variables;

short this_sec = 74;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "You are at the base of a pair of huge stone pillars, flanking an ancient stone road. A nearby sign identifies this north-south path as the Pilgrimage Road. The main roadway cutting all the way through the Rokaj.";
	text2 = "You absorbed enough of your schooling to know a little bit about the geography of the Ro. If you go north from here, you can reach the three other provinces of the Rokaj: The Kranas Woods, the Low Dhaga, and the High Litha.";
	code =
		sf(100 + this_sec,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "An uneven path leads through the woods to a small mining camp set into the cliff wall. The forest grows eerily quiet. Patches of the grass are scorched. Pools of sticky slime ooze out of the ground.";
	text2 = "And out of the corner of your eye, you would swear that sometimes the trees move.";
	code =
		sf(100 + this_sec,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "Now that the walking plants have been thoroughly chopped up, you can go back to searching the farmhouse. You manage to find something of use behind a smashed table: A nice, only slightly dented bronze helmet.";
	text2 = "You find no sign of the farmers who lived here, but you suspect they fled on their own not long after they saw walking trees.";
	code =
		reward_give(256);
	break;

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "The raiders have been destroyed. You doubt the Rokaj will be too upset. When you become a raider, this sort of thing is just a risk you accept.";
	text2 = "You search their bags of loot. You find a healthy pile of coins and a few pieces of strange, dull metal.";
	code =
		change_coins(100,TRUE);
		change_crafting(0,0,0,1,0);
	break;

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You are not far from a large farmhouse. It looks wealthy and well, spared from the recent raids. You can see guards poking their heads out of the windows, and workers till the fields.";
	text2 = "They immediately recognize you, and they are gratified by your return.";
	code =
		if (gf(174,11) == 0)
			rs(2);
	break;
	
begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Approach.";
	text1 = "When the Ro here see that you are from Haven, they come out to greet you. They are typical of the Gentle Coast: Wealthy, pink-cheeked, and well-fed. They wear arms and armor, but they are light and ceremonial.";
	text2 = "This farm is prosperous, and the clan that lives here is eager to show it off. They invite you in for a meal and to trade.";
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Leave.";
	text1 = "You depart unhindered.";
	action = END_TALK;

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Ask about the raiders.";
	text1 = "The farmers are full of shame and urge you to believe that they have nothing to do with the _savage, backward_ Ro of the mountains. They let you know that, in the Gentle Coast, Haven is much loved.";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Accept a meal.";
	text1 = "The table is weighed down with meat, fruit, and bread. Some of the ingredients and recipes are from other vassals of Haven. Your Empire's trade carries inventions and ideas as well as goods.";
	text2 = "It is delicious.";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "See what they sell.";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Coast Farm",
		  "Rich Farmhouse.",
		  22,4,0);	
	break;

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Depart.";
	text1 = "Everyone gathers and waves as you depart.";
	action = END_TALK;
	code =
		sf(174,11,1);
	break;
	
	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "You approach a small farmhouse. It looks intact and free of theft. Yet, it is utterly quiet. No smoke rises from the chimney, and no people are to be seen.";
	text2 = "You look around and find nothing of interest. The owners are still absent, and no fresh monsters showed up.";
	code =
		if (gf(174,12) == 0)
			rs(2);
	break;

begintalknode;
	state = 40;
	nextstate = 41;
	condition = gf(174,12) == 0;
	question = "Approach and investigate.";
	text1 = "You wander around in the farmhouse. It is mostly empty. Whoever lived here, they left recently. They took most everything of value with them.";
	text2 = "As you poke around, you look out the window. That's odd. You would have sworn that the forest wasn't this close an hour ago.";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Leave.";
	text1 = "You depart unhindered.";
	action = END_TALK;

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "Keep searching.";
	text1 = "You don't have time. The rustling outside gets louder. It's very distracting.";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "Walk outside to investigate.";
	text1 = "When you walk outside, the forest comes to greet you ...";
	action = END_TALK;
	code =
		sf(174,12,1);
		make_outdoor_enc(215,363,0);
		set_out_fight_field(6);
	break;

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "You are not far from a small farmhouse. It is more or less intact, if not as prosperous as those to the south. Smoke rises from the chimney.";
	text2 = "The brigands immediately recognize you. They cautiously wait for your approach.";
	text3 = "The smoke is from the fire set by the brigands before you confronted them. There is nothing of value left.";
	code =
		rs(2); rs(3);
		if (gf(174,13) == 1)
			as(2);
		if (gf(174,13) == 2)
			as(3);
	break;

begintalknode;
	state = 70;
	nextstate = 71;
	condition = gf(174,13) < 2;
	question = "Approach the farmhouse.";
	text1 = "When you get close, armed warriors emerge to greet you. They are not wealthy farmers with ceremonial weapons, like you usually meet in the Gentle Coast. They are thin, hard raiders from the mountains. They have taken over this fort.";
	text2 = "Their leader says, _You are from Haven. You will know. This farm was taken by battle, in an honorable raid of the Rokaj. You have no business here._";
	text3 = "Their leader says, _You have returned. You are the [P]? You will know. This farm is our reward, properly taken by arms in the way of the Ro. You have no business here._";
	code =
		if (gf(174,13) == 0)
			rs(3);
			else rs(2);
	break;
	
begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Leave.";
	text1 = "You depart unhindered.";
	action = END_TALK;

begintalknode;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "_I was attacked by your raiders._";
	text1 = "They look at each other nervously. _We know nothing of that. We are honorable raiders, taking from the fat and weak in the way of the Rokaj. We do not attack Havenites. I swear._";

begintalknode;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "_What happened to the farmers who were here?_";
	text1 = "_We told them, 'fight or flee.' They fled. When we have taken what we want, they may return._";

begintalknode;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "_I'll be going, then._";
	text1 = "The raiders nod, visibly relieved. They return to their careful and thorough looting.";
	action = END_TALK;
	code =
		sf(174,13,1);
	break;
	
begintalknode;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "_We do not allow these raids in our vassals._ Attack.";
	text1 = "The raiders are surprised by this. _But ... you always have before! Come! We must abandon our treasure!_ The warriors flood out of the farmhouse. As one of them throws a lit torch back in through the window, the rest attack you.";
	action = END_TALK;
	code =
		make_outdoor_enc(205,349,1);
		sf(174,13,2);
	break;


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				